package model

import (
	"food-mgr/food-service/configs"
	"gorm.io/gorm"
)

type Pick struct {
	gorm.Model
	Name    string `gorm:"type:varchar(30);comment:名称"`
	Address string `gorm:"type:varchar(30);comment:地址"`
	Year    string `gorm:"type:varchar(50);comment:营业时间"`
}

func ListPick(p *[]Pick, address string) error {

	return configs.DB.Where("address like ?", "%"+address+"%").Find(&p).Error
}
